﻿using System;
using BluePortal.Medias.Core;

namespace BluePortal.QuikStart
{
    public partial class CategoryForm : System.Web.UI.Page
    {
        private BCCategory service = new BCCategory();

        protected void Page_Load(object sender, EventArgs e)
        { 
        }

        protected void ButtonAdd_Click(object sender, EventArgs e)
        {
            Category cat = new Category();
            cat.Name = TextBox1.Text;
            service.Create(cat);
        }

        protected void AddCategory2Video(object sender, EventArgs e)
        {            
            Guid categoryID = new Guid (DropDownListCategories.SelectedValue);
            service.Add(categoryID, new Guid(DropDownListVideo.SelectedValue));
        }

    }
}
